Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KPM to main #92

Closed
wants to merge 11 commits into from
Closed

Add KPM to main #92

wants to merge 11 commits into from

Conversation

Lazersmoke
Copy link
Contributor

This feature is under active development by Harry, so I assume it's not ready yet. This PR is so that it is not forgotten!

@Lazersmoke
Copy link
Contributor Author

Also: per a discussion with Martin today, a third kind of intensity formula, KPMIntensityFormula will need to be added, since KPM responds to S(q,w) queries instead of (disp(q),intensity(q)) queries. I can create this from the KPMintensities and KPMdssf functions if/when they are stabilized.

@kbarros
Copy link
Member

kbarros commented Jul 15, 2023

Also: per a discussion with Martin today, a third kind of intensity formula, KPMIntensityFormula will need to be added, since KPM responds to S(q,w) queries instead of (disp(q),intensity(q)) queries.

I am not sure about the details, but this sounds familiar to the situation from classical dynamics -- in both cases, we will be querying S(q,w) for a list of q values. Could the UI be shared?

@Lazersmoke
Copy link
Contributor Author

in both cases, we will be querying S(q,w) for a list of q values. Could the UI be shared?

The UX is shared (in the sense that its just intensity_formula in all cases), but they are doing fundamentally different things.

Classical: list of indexes describing qs from the list of available qs. If a q is outside that list, then interpolation needs to happen, intensities_interpolation

KPM: list of any, arbitrary qs, with no interpolation. Then, we wouldn't want users to call intensities_interpolated because that's misleading. So it should probably be called either plain intensities or intensities_kpm if we don't want people confused why intensities(::StructureFactor) isn't defined. (c.f. LSWT uses intensities_broadened and intensities_bands depending if there is broadening)

What can maybe be done is to define intensities_binned(::KPM) (but only if we can analytically integrate the KPM Intensity(q,w) function over small finite volumes (q+dq,w+dw), @hlane33 ?), and actually this would be highly desirable for inverse problem if its fast.

@Lazersmoke Lazersmoke changed the base branch from candidate-main to main July 18, 2023 14:04
@Lazersmoke Lazersmoke changed the title Add KPM to candidate-main Add KPM to main Jul 18, 2023
@Lazersmoke
Copy link
Contributor Author

FYI on this: Probably the Cairo dependency at least should be removed before merging. That's just for the examples, which can go in SunnyTutorials instead presumably? Or ported to GLMakie and left here

@kbarros kbarros force-pushed the kpm branch 2 times, most recently from 1618a3d to 40228b2 Compare July 28, 2023 19:21
@kbarros
Copy link
Member

kbarros commented Jul 28, 2023

Before we merge this I think @hlane33 should reapply the commits so that they are correctly credited as the author, with coauthor ddahlbom.

(To deal with rebasing issues, I reapplied the changes from scratch, which accidentally gave myself credit.)

kbarros and others added 7 commits December 13, 2023 10:01
Capitalize KPM.

Implement KPM intensity formula

Add KPM element contraction.

Implement KPM intensity formula (with Sam's help).

Implement quasi-Hermitian Lanczos.

Comment test.

Finish integrating QH Lanczos.

Fix kpm test

Add plotting files.

fix plotting2d

Fix test

Fix sqrt(M) factor.

KPM fix scaling of Bose factor and regularization.

Fix repetition post refactor.

Minor edits to bring in line with new intensities.

Squashed commit bringing up to date with Sam's branch

commit f001c5e
Author: Sam Quinn <lazersmoke@gmail.com>
Date:   Sat Nov 4 11:45:44 2023 -0400

    update

commit 69ca719
Author: Sam Quinn <lazersmoke@gmail.com>
Date:   Thu Nov 2 10:53:47 2023 -0400

    update intensity_formula_kpm

commit cc34446
Author: Harry Lane <htl7@st-andrews.ac.uk>
Date:   Wed Nov 1 11:18:47 2023 +0000

    KPM fix scaling of Bose factor and regularization.

commit e3ea347
Author: Harry Lane <htl7@st-andrews.ac.uk>
Date:   Mon Oct 30 15:26:55 2023 +0000

    Remove symmetrization to get offdiag corrs.

commit 1fc1790
Author: Sam Quinn <lazersmoke@gmail.com>
Date:   Wed Nov 1 11:13:06 2023 -0400

    positive and negative frequency LSWT

commit 6558c6e
Author: Sam Quinn <lazersmoke@gmail.com>
Date:   Tue Oct 31 12:15:43 2023 -0400

    Add regularization options

commit 72e056d
Author: Harry Lane <htl7@st-andrews.ac.uk>
Date:   Mon Oct 30 15:11:27 2023 +0000

    Introduce cubic regularization.

commit cd6347e
Author: Harry Lane <htl7@st-andrews.ac.uk>
Date:   Mon Oct 30 10:31:19 2023 +0000

    Fix sqrt(M) factor.

commit 89123f2
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Mon Sep 11 23:16:50 2023 -0400

    Fix test

commit 9f522ca
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Thu Sep 7 12:18:50 2023 -0400

    fix plotting2d

commit 39ed498
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Thu Sep 7 10:03:47 2023 -0400

    Add plotting files.

commit 97549f4
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Tue Sep 5 22:29:50 2023 -0400

    Fix kpm test

commit 8694b09
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Tue Sep 5 18:40:26 2023 -0400

    Finish integrating QH Lanczos.

commit 09ac14f
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Wed Aug 30 20:39:39 2023 -0400

    Comment test.

commit 191f2f2
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Tue Aug 29 22:24:35 2023 -0400

    Implement quasi-Hermitian Lanczos.

commit e1a1375
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Fri Aug 11 15:29:34 2023 -0400

    Implement KPM intensity formula (with Sam's help).

commit be51cda
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Thu Aug 10 13:31:50 2023 -0400

    Add KPM element contraction.

commit 824ecf4
Author: Sam Quinn <lazersmoke@gmail.com>
Date:   Fri Aug 4 15:15:40 2023 -0400

    Implement KPM intensity formula

commit 6f29102
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Wed Aug 2 10:55:19 2023 -0400

    Add kpm dipole mode.

commit 1ce57e4
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Tue Aug 1 12:45:23 2023 -0400

    Capitalize KPM.

commit 951722c
Author: [Harry Lane] <[hlane34@gatech.edu]>
Date:   Tue Aug 1 12:14:56 2023 -0400

    KPM Implementation.

Remove redundant `intensity_formula`

patch `intensity_formula_kpm` to not depend on omega

Add susceptibility regularization style

Rebased onto inhomog_lswt and fix ref to rots

Take max(abs()) for Lanczos.
@kbarros
Copy link
Member

kbarros commented Aug 6, 2024

Development for this feature has moved to #289.

@kbarros kbarros closed this Aug 6, 2024
@kbarros kbarros deleted the kpm branch August 20, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants